<template>
	<view class="mapWrapper">
		<map v-if="{loc}" style="width: 100%; height: 100%;" :latitude="latitude" :longitude="longitude" :markers="covers">
		</map>

	</view>
</template>

<script>
	import premiss from '../../common/premiss.js';  
	export default {
		data() {
			return {
				latitude: 39.909,
				longitude: 116.39742,
				loc:false
			}
		},
		onLoad() {
			var self = this
			premiss.getLocation((res)=>{
				self.latitude = res.lat;
				self.longitude = res.long;
				self.loc = true
			})
		}
	}
</script>

<style>
.mapWrapper {
	width: 100%;
	height: 100%;
}
</style>
